<?php
/**
 * Configuration-manager metadata for noiewarning plugin
 *
 * @license:    GPL 2 (http://www.gnu.org/licenses/gpl.html)
 * @author:     Luis Machuca <luis.machuca@gulix.cl>
 */

//if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
if(!defined('NOIEWARNING_RECOMMENDS')) define('NOIEWARNING_RECOMMENDS', DOKU_PLUGIN.'noiewarning/recommend/');
    $recs= array ('', 'custom');

    if (@is_dir(NOIEWARNING_RECOMMENDS)) {
    $handle=  @opendir(NOIEWARNING_RECOMMENDS);
    if (false !== $handle) {

        while (false !== ($fnam = @readdir($handle))) {
            $a= @explode('.', $fnam);
            $a= $a[0];
            if (!@in_array($a, $recs) and ($a!='')) $recs[]= $a;
        } // end while

        @closedir($handle);
    }
    else {
        $recs[]= 'N/A';
    } // opendir
    } // isdir

/**
 * @var        method
 * @brief      How to send the notification
 *
 * Possible values:
 * - subsection  : creates raw content at top of wikipage (default)
 * - notify      : uses DokuWiki notification functions
 * - note        : creates a Note Info (requires Note Plugin)
 */
$meta['method']     = array('multichoice', '_choices'=> array(
                            'subsection','notify','note','splash')
                            );
//! wikipage : the wikipage containing the message, in pagename format
$meta['wikipage']   = array('string');
//! banner : the content of the message, in DokuWiki format
//! better : id string for the recommended browser (empty == use custom)
$meta['better']     = array('multichoice' , '_choices'=>$recs );
//! min_ie_verson : numeric value of the minimal acceptable IE version
$meta['min_ie_version']  = array('numeric');

